/**
 *
 */
package
{
    import constants.DialogType;

    import flash.geom.Rectangle;

    import model.AnalyticProxy;

    import model.LogProxy;

    import org.kolonitsky.alexey.mvcext.model.GuideStepVO;

    import org.kolonitsky.alexey.mvcext.model.GuideVO;

    import view.ExportMediator;

    import view.screens.AnalyticMediator;
    import view.screens.LogMediator;

    [Bindable]
    public class Config
    {
        //---------------------------------------------------------------------
        // Constant config
        //---------------------------------------------------------------------

        /**
         *  Analytic record limit is a count of records is minimum for collect
         *  statistic.
         */
        public static const ANALYTIC_RECORD_LIMIT:uint = 100;

        /**
         *
         */
        public static const TOKEN_GET:String = "authentication_token.json";

        /**
         * Static dictionary with country code, name, currency and language.
         */
        public static const COUNTY_INFO_GET:String = "http://elfin.by/mock/county_dictionary.json";

        /**
         *  List of defaults colours for tags.
         */
        public static const TAG_COLOR:Array = [0xE31A1C, 0x377DB8, 0x4DAF4A, 0x984AE3, 0xFF7F00, 0xFFFF33, 0xa65628, 0xF781BF];


        //-----------------------------
        // Application Constants
        //-----------------------------

        public static const VERSION:String = "1.0.0";
        public static const APPLICATION_NAME:String = "elfin";


        //-----------------------------
        // Currencies
        //-----------------------------

        public static const CURRENCIES_GET:String = "currencies/exchange_rates";


        //-----------------------------
        // Operation with records
        //-----------------------------

        public static const RECORD_ADD:String = "tweet_operation.json";
        public static const RECORD_DELETE:String = "del_operation.json";
        public static const RECORD_UPDATE:String = "update_operation.json";
        public static const LOG_GET:String = "index.json";


        //-----------------------------
        // Operation with user
        //-----------------------------

        public static const USER_PASSWORD:String = "users/password";
        public static const USER_SIGN_IN:String = "users/sign_in.json";
        public static const USER_SIGN_UP:String = "users.json";
        public static const USER_SIGN_OUT:String = "users/sign_out.json";


        //-----------------------------
        // Page id's
        //-----------------------------

        public static const PAGE_LOG:String = "log";
        public static const PAGE_ANALYTICS:String = "analytics";


        public static const GUIDES:Array =
        [
            new GuideVO(
                LogProxy.LOG_IS_EMPTY,
                [
                    new GuideStepVO(
                        "Введите первую запись вашего списка дохода/расхода!",
                        new Rectangle(5, 7, 885, 30),
                        LogProxy.UPDATE_BALANCE
                    ),
                    new GuideStepVO(
                        "Ваш баланс будет автоматически обновляться с каждой введенной записью",
                        ["logScreen", "balanceArea"],
                        10000
                    )
                ]
            )
        ];


        //---------------------------------------------------------------------
        // Variable config
        //---------------------------------------------------------------------

        public static var preloaderDialog:String = DialogType.NONE;
        public static var defaultPageId:String = PAGE_LOG;


        //-----------------------------
        // Structure
        //-----------------------------

        public static var structure:Object =
        {
            log:
            {
                proxies:[LogProxy],
                mediators:[LogMediator, ExportMediator]
            },
            analytics:
            {
                proxies:[AnalyticProxy, LogProxy],
                mediators:[AnalyticMediator]
            }
        }
    }
}
